package com.example.wechattakeaway.service;

import com.example.wechattakeaway.entity.UserAddress;
import com.example.wechattakeaway.form.addressform.InsertAddressForm;
import com.example.wechattakeaway.form.addressform.UpdateAddressForm;
import com.example.wechattakeaway.vo.ResultVO;

import java.util.List;

public interface AddressService {

    /*
    新增一个收货地址
    @param InsertAddressForm
    @return UserAddress
     */
    ResultVO InsertAddress(InsertAddressForm insertAddressForm);

    /*
    更新一个收货地址
    @param UserAddress
    @return null
     */
    ResultVO UpdateAddress(UpdateAddressForm updateAddressForm);

    /*
    根据id删除一个收货地址
    @param addressId
    @return null
     */
    ResultVO DeleteAddress(Integer addressId);

    /*
    根据id查询一个收货地址
    @param addressId
    @return UserAddress
     */
    ResultVO SelectAddressById(Integer userId);

    /*
    根据一个用户查询他所有的收货地址
    @param sysuserId
    @return list
     */
    ResultVO SelectAddressByUser(Integer pageNum,Integer sysuserId);

}
